<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>myblog</title>
    <link href="/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
        .navbar {
            margin-bottom: 0;
        }
        form{
            margin-bottom: 20px;
        }
    </style>


</head>

<body>

<%- include("header",{isLogin:isLogin,username:username}) %>

<div class="container">
    <h3>文件上传</h3>
    <form class="form-horizontal" role="form" action="/frontend/blog/doupload" method="post" enctype="multipart/form-data">

        <div class="form-group">

            <div class="col-sm-10">
                <input type="file" class="form-control" id="file" name="file" >
            </div>
        </div>
        <button type="submit" id="btn_login" class="btn btn-default">上传</button>

    </form>

    <div class="panel panel-default">
        <!-- Default panel contents -->
        <div class="panel-heading">文件列表</div>
        <!-- Table -->
        <table class="table">
            <thead>
            <tr>
                <th>序号</th>
                <th>文件名</th>
                <th>上传者</th>
                <th>上传日期</th>
            </tr>
            </thead>
            <tbody>
            <% for(var i=0;i<files.length ; i++){ %>
            <tr >
                <td><%= i %></td>
                <td><%= files[i].filename %></td>
                <td><%= files[i].username %></td>
                <td><%= files[i].date.minute %></td>
            </tr>
            <% } %>
            </tbody>
        </table>
    </div>
</div>


<!-- Placed at the end of the document so the pages load faster -->
<script src="/js/jquery-1.11.3.min.js"></script>
<script src="/js/bootstrap.js"></script>
<script type="text/javascript">

</script>
</body>
</html>
